# Contributor: Emanuele Sorce <emanuele.sorce@hotmail.com>
# Maintainer: Emanuele Sorce <emanuele.sorce@hotmail.com>
pkgname=sturmreader
pkgver=3.6.1
pkgrel=1
pkgdesc="E-Book and comic reader for mobile devices"
url="https://gitlab.com/tronfortytwo/sturmreader"
arch="aarch64 armv7 x86 x86_64" # Limited by qt5-qtwebengine
license="GPL-3.0-or-later"
depends="qt5-qtsvg qt5-qtbase-sqlite qt5-qtwebengine qt5-qtquickcontrols qt5-qtsystems"
makedepends="cmake qt5-qtdeclarative-dev qt5-qtquickcontrols2-dev qt5-qtsvg-dev
	qt5-qtlocation-dev qt5-qtwebengine-dev qt5-qtwebchannel-dev poppler-qt5-dev
	quazip-dev gettext-dev libintl"
subpackages="$pkgname-lang"
source="https://gitlab.com/tronfortytwo/sturmreader/-/archive/$pkgver/sturmreader-$pkgver.tar.gz
	fix-hardcoded-quazip-version.patch"

# Sturm reader has no testing! Not even a --version thing
options="!check"

build() {
	cmake -G Ninja -B build \
		-DCLICK_MODE=OFF \
		-DCMAKE_BUILD_TYPE=MinSizeRel
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ca9332b8a7810dc07d1ca9fc18260fcd1905a494be239357cfafd30e81521bb05f0e6073b6dc5fe9f8cf20395a98d5cbb96e7dd797f548274c86cfb25f3ec704  sturmreader-3.6.1.tar.gz
702619584aedc6f3e25ad1f789421ef343a72b43c707e6b9b621560fba030cb97591de6fc2ea816b82d6a9f9911d934b42a01c236d856d9f596f331743badb83  fix-hardcoded-quazip-version.patch
"
